package org.jeecg.modules.car.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.jeecg.common.api.vo.Result;
import org.jeecg.entity.car.CarMerchantDerate;

import java.util.List;

/**
 * @Description: 商户优惠券
 * @Author: jeecg-boot
 * @Date:   2020-10-22
 * @Version: V1.0
 */
public interface CarMerchantDerateMapper extends BaseMapper<CarMerchantDerate> {

    int editDerate(@Param("bean") CarMerchantDerate carMerchantDerate);

    int delDerate(@Param("bean") CarMerchantDerate carMerchantDerate);

    int batchDelDerate(@Param("list") List<String> derateIds);

    List<CarMerchantDerate> findPage(Page<CarMerchantDerate> page, @Param("carMerchantDerate") CarMerchantDerate carMerchantDerate);

    List<CarMerchantDerate> derateList(Page<CarMerchantDerate> page, @Param("carMerchantDerate") CarMerchantDerate carMerchantDerate);

    CarMerchantDerate getByPlateStatus(@Param("plate") String plate, @Param("status") Integer status);

    void updateUseStatus(@Param("id") String derateId,@Param("oldStatus") Integer oldStatus,@Param("newStatus") Integer newStatus,@Param("usedNumber") Integer usedNumber);

    void deleteDonateDerate(@Param("bean") CarMerchantDerate carMerchantDerate);

}
